使用語法
docker-compose up -d nginx mysql
回應錯誤
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
解決辦法
啟動 docker。
sudo systemctl start docker
通過運行 hello-world 映像驗證 Docker Engine 是否已正確啟動。
sudo docker run hello-world
// 出现 Hello from Docker! 说明 docker 啟動成功